<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // const p1 = Promise.resolve(1)
        // console.log(p1)
        const p2 = Promise.resolve(new Promise((resolve,reject)=>{

            resolve(2)
        }))
        console.log(p2)
        // 快速把一个值包装成成功状态的promise实例
        // 默认返回成功状态的promise实例，值为传递的实参
        //如果传递的实参是一个promise实例，则返回值与这个实参保持一致
    </script>
</body>
</html>